<!DOCTYPE html>
<html>

<head>
	<meta charset='UTF-8'>
	
	<title>(Better) Round Out Tabs</title>
	
	
	<style>
        .tabrow-center {
            text-align: center;
        }
        .tabrow-left {
            text-align: left;
        }
        .tabrow-right {
            text-align: right;
        }
		.tabrow {
		    list-style: none;
		    margin: 0px 0 20px;
		    padding: 0;
		    line-height: 24px;
		    height: 26px;
		    overflow: hidden;
		    font-size: 12px;
		    font-family: verdana;
		    position: relative;
		}
		.tabrow li {
		    border: 1px solid #AAA;
		    background: #D1D1D1;
		    background: -o-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
		    background: -ms-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
		    background: -moz-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
		    background: -webkit-linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
		    background: linear-gradient(top, #ECECEC 50%, #D1D1D1 100%);
		    display: inline-block;
		    position: relative;
		    z-index: 0;
		    border-top-left-radius: 6px;
		    border-top-right-radius: 6px;
		    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.4), inset 0 1px 0 #FFF;
		    text-shadow: 0 1px #FFF;
		    margin: 0 -5px;
		    padding: 0 20px;
		}
		.tabrow a {
			  color: #555;
			  text-decoration: none;
		}
		.tabrow li.selected {
		    background: #FFF;
		    color: #333;
		    z-index: 2;
		    border-bottom-color: #FFF;
		}
		.tabrow:before {
		    position: absolute;
		    content: " ";
		    width: 100%;
		    bottom: 0;
		    left: 0;
		    border-bottom: 1px solid #AAA;
		    z-index: 1;
		}
		.tabrow li:before,
		.tabrow li:after {
		    border: 1px solid #AAA;
		    position: absolute;
		    bottom: -1px;
		    width: 5px;
		    height: 5px;
		    content: " ";
		}
		.tabrow li:before {
		    left: -6px;
		    border-bottom-right-radius: 6px;
		    border-width: 0 1px 1px 0;
		    box-shadow: 2px 2px 0 #D1D1D1;
		}
		.tabrow li:after {
		    right: -6px;
		    border-bottom-left-radius: 6px;
		    border-width: 0 0 1px 1px;
		    box-shadow: -2px 2px 0 #D1D1D1;
		}
		.tabrow li.selected:before {
		    box-shadow: 2px 2px 0 #FFF;
		}
		.tabrow li.selected:after {
		    box-shadow: -2px 2px 0 #FFF;
		}
        .tabcontent {
            display: none;
            padding: 6px 12px;
        }
        .pull-left {
            float: left !important;
        }
	</style>
	
	<script>
    function opentab(evt, tabname) {
    var i, tabcontent, tablinks;
    tabcontent = document.getElementsByClassName("tabcontent");
    for (i = 0; i < tabcontent.length; i++) {
        tabcontent[i].style.display = "none";
    }
    tablinks = document.getElementsByClassName("tablinks");
    for (i = 0; i < tablinks.length; i++) {
        tablinks[i].className = tablinks[i].className.replace(" selected", "");
    }
    document.getElementById(tabname).style.display = "block";
    evt.currentTarget.className += " selected";
}
	</script>
</head>

<body>

	Hi<ul class="tabrow  tabrow-right">
	    <li class="tablinks"  onclick="opentab(event, '0')"><a href="#">Lorem</a></li>
	    <li class="tablinks"  onclick="opentab(event, '1')"><a href="#">Ipsum</a></li>
	    <li class="tablinks"  id="defaultOpen" onclick="opentab(event, '2')"><a href="#">Sit amet</a></li>
	</ul>
	<div id="0" class="tabcontent">
          <h3>Tab 0</h3>
          <p>London is the capital city of England.</p>
        </div>

        <div id="1" class="tabcontent">
          <h3>Tab 1</h3>
          <p>Paris is the capital of France.</p> 
        </div>

        <div id="2" class="tabcontent">
          <h3>Tab 2</h3>
          <p>Tokyo is the capital of Japan.</p>
        </div>
</body>
	<script>
        document.getElementById("defaultOpen").click();
    </script>
</html>
